<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "https://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="Content-Language" content="zh-CN"><link href="stylesheet.css" media="all" rel="stylesheet" type="text/css">
<title>CHECKPOINT</title>
<script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?d286c55b63a3c54a1e43d10d4c203e75"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script>
</head><body class="REFENTRY">
<div>
<table summary="Header navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><th colspan="5" align="center" valign="bottom">PostgreSQL 8.2.3 中文文档</th></tr>
<tr><td width="10%" align="left" valign="top"><a href="sql-begin.html" accesskey="P">后退</a></td><td width="10%" align="left" valign="top"><a href="sql-begin.html">快退</a></td><td width="60%" align="center" valign="bottom"></td><td width="10%" align="right" valign="top"><a href="sql-close.html">快进</a></td><td width="10%" align="right" valign="top"><a href="sql-close.html" accesskey="N">前进</a></td></tr>
</table>
<hr align="LEFT" width="100%"></div>
<h1><a name="SQL-CHECKPOINT"></a>CHECKPOINT</h1>
<div class="REFNAMEDIV"><a name="AEN45638"></a><h2>名称</h2>CHECKPOINT&nbsp;--&nbsp;强制一个事务日志检查点</div>
<a name="AEN45641"></a>
<div class="REFSYNOPSISDIV"><a name="AEN45643"></a><h2>语法</h2>
<pre class="SYNOPSIS">CHECKPOINT</pre>
</div>
<div class="REFSECT1"><a name="AEN45645"></a><h2>描述</h2>
<p>预写式日志(WAL)缺省时在事务日志中每隔一段时间放置一个检查点。要调整这个原子化检查点的间隔，你可以参考运行时选项 <a href="runtime-config-wal.html#GUC-CHECKPOINT-SEGMENTS">checkpoint_segments</a> 和 <a href="runtime-config-wal.html#GUC-CHECKPOINT-TIMEOUT">checkpoint_timeout</a> 。<tt class="COMMAND">CHECKPOINT</tt> 强迫立即进行检查，而不是等到下一次调度时的检查点。</p>
<p>检查点是一个事务日志中的点，所有数据文件都在该点被更新以反映日志中的信息，所有数据文件都将被刷新到磁盘。请参考<a href="wal.html">章27</a>获取更多有关 WAL 系统的信息。</p>
<p>只有超级用户可以调用 <tt class="COMMAND">CHECKPOINT</tt> 。该命令不是设计用于常规操作的。</p>
</div>
<div class="REFSECT1"><a name="AEN45655"></a><h2>兼容性</h2>
<p><tt class="COMMAND">CHECKPOINT</tt> 命令是 PostgreSQL 语言的扩展。</p>
</div>
<div>
<hr align="LEFT" width="100%">
<table summary="Footer navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td width="33%" align="left" valign="top"><a href="sql-begin.html" accesskey="P">后退</a></td><td width="34%" align="center" valign="top"><a href="index.html" accesskey="H">首页</a></td><td width="33%" align="right" valign="top"><a href="sql-close.html" accesskey="N">前进</a></td></tr>
<tr><td width="33%" align="left" valign="top">BEGIN</td><td width="34%" align="center" valign="top"><a href="sql-commands.html" accesskey="U">上一级</a></td><td width="33%" align="right" valign="top">CLOSE</td></tr>
</table>
</div>
</body></html>